<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>书籍详情</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css">
</head>
<body>
<div class="container">
    <h1 class="mt-4">书籍详情</h1>

    <div class="card">
        <div class="card-body">
            <h5 class="card-title" th:text="${book.name}">书名</h5>
            <p class="card-text"><strong>类型：</strong><span th:text="${book.type}">书籍类型</span></p>
            <p class="card-text"><strong>作者：</strong><span th:text="${book.author}">书籍作者</span></p>
            <p class="card-text"><strong>价格：</strong><span th:text="${book.price}">0.00</span></p>
        </div>
    </div>

    <a href="/books" class="btn btn-secondary mt-3">返回书籍列表</a>
    <a th:href="@{/book/edit/{id}(id=${book.id})}" class="btn btn-warning mt-3">编辑书籍</a>
    <form th:action="@{/book/delete/{id}(id=${book.id})}" method="post" style="display:inline;">
        <button type="submit" class="btn btn-danger mt-3">删除书籍</button>
    </form>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
